package com.llw.login;

import androidx.appcompat.app.AppCompatActivity;
import androidx.lifecycle.MutableLiveData;
import androidx.lifecycle.Observer;

import android.os.Bundle;
import android.util.Log;
import android.view.View;

import com.llw.annotation.BindPath;
import com.llw.common.LiveDataBus;
import com.llw.router.Router;

import java.util.logging.Logger;

@BindPath("login/login")
public class LoginActivity extends AppCompatActivity {
    LiveDataBus.BusMutableLiveData<String> llw;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_login);


        llw = LiveDataBus.getInstance().with("lisan", String.class);

        llw.observe(LoginActivity.this,true, new Observer<String>() {
            @Override
            public void onChanged(String s) {
                Log.d("LoginActivity-->",s);
            }
        });
    }

    public void jumpActivity(View view){
        llw.postValue("这是后面发送的通知");
        Router.getInstance().jumpActivity("login2/login2",null);
    }
}
